type Route = {
  /**
   * Any valid URL path
   */
  path?: string;
  /**
   * A React component to render only when the location matches.
   */
  component?: string | (() => any);
  wrappers?: string[];
  /**
   * navigate to a new location
   */
  redirect?: string;
  /**
   * When true, the active class/style will only be applied if the location is matched exactly.
   */
  exact?: boolean;
  routes?: Route[];
  title?: string;
  name?: string;
  key?: string;
};
const WEB_NAME = '好老师';
const routes: Route[] = [
  {
    title: `${WEB_NAME}-登录`,
    name: '登录',
    path: '/',
    component: '@/pages/login/index.tsx',
  },
  {
    title: `${WEB_NAME}-登录`,
    name: '登录',
    path: '/login',
    component: '@/pages/login/index.tsx',
  },
  {
    path: '/401',
    component: '@/pages/error/401',
    name: '401',
    key: '401',
  },
  {
    path: '/403',
    component: '@/pages/error/403',
    name: '403',
    key: '403',
  },
  {
    path: '/404',
    component: '@/pages/error/404',
    name: '404',
    key: '404',
  },
  {
    path: '/500',
    component: '@/pages/error/500',
    name: '500',
    key: '500',
  },
  /**
   * 学生路由
   */
   {
    path: '/student/studentHome',
    component: '@/pages/student/studentHome/index.tsx',
    name: '首页',
    key: '首页',
  },
  {
    path: '/student/sijuan',
    component: '@/pages/student/components/sijuan.tsx',
    name: '试卷',
    key: '试卷',
  },
  {
    path: '/',
    component: '@/layouts/index',
    routes: [
      {
        title: `修改密码`,
        name: `修改密码`,
        path: `/changePassword`,
        component: `@/pages/changePassword/index.tsx`,
      },
      /**
       * 管理员路由
       */
      {
        title: `学生信息管理`,
        name: `学生信息管理`,
        path: `/admin/studentInfo`,
        component: `@/pages/admin/studentInfo/index.tsx`,
      },
      {
        title: `教师信息管理`,
        name: `教师信息管理`,
        path: `/admin/teacherInfo`,
        component: `@/pages/admin/teacherInfo/index.tsx`,
      },
      {
        title: `班级管理`,
        name: `班级管理`,
        path: `/admin/class`,
        component: `@/pages/admin/class/index.tsx`,
      },
      /**
       * 教师路由
       */
       {
        title: `添加题目`,
        name: `添加题目`,
        path: `/teacher/addQuestion`,
        component: `@/pages/teacher/addQuestion/index.tsx`,
      },
      {
        title: `题库管理`,
        name: `题库管理`,
        path: `/teacher/questionBank`,
        component: `@/pages/teacher/questionBank/index.tsx`,
      }
    ]
  }
  
];
export default routes;
